home *** CD-ROM | disk | FTP | other *** search
- unit Tstringf;
-
- interface
-
- uses
- SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
- Forms, Dialogs, FileCtrl, StdCtrls;
-
- type
- TForm1 = class(TForm)
- FileListBox1: TFileListBox;
- DirectoryListBox1: TDirectoryListBox;
- DriveComboBox1: TDriveComboBox;
- FilterComboBox1: TFilterComboBox;
- Label1: TLabel;
- Memo1: TMemo;
- OpenBtn: TButton;
- ListBox1: TListBox;
- LoadBtn: TButton;
- SaveBtn: TButton;
- procedure OpenBtnClick(Sender: TObject);
- procedure LoadBtnClick(Sender: TObject);
- procedure SaveBtnClick(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
-
- var
- Form1: TForm1;
-
- implementation
-
- {$R *.DFM}
-
- procedure TForm1.OpenBtnClick(Sender: TObject);
- begin
- {Empty the memo and read the file.}
- Memo1.Lines.Clear;
- Memo1.Lines.LoadFromFile(FileListBox1.Filename);
- end;
-
- procedure TForm1.SaveBtnClick(Sender: TObject);
- begin
- Memo1.Lines.SaveToFile(FileListBox1.Filename);
- end;
-
- procedure TForm1.LoadBtnClick(Sender: TObject);
- begin
- ListBox1.Items.LoadFromFile(FileListBox1.Filename);
- end;
-
- end.
-